Extracting method of pattern contour, image processing method, searching method of pattern edge, scanning method of probe, manufacturing method of semiconductor device, pattern inspection apparatus, and program

ABSTRACT

An extracting method of a pattern contour, includes acquiring an image of a pattern to be inspected, calculating a schematic edge position of the pattern from the image, preparing an approximate polygon by approximating a polygon consisting of edges having predetermined direction components to a contour shape of the pattern on the basis of the calculated edge position, dividing the approximate polygon into star-shaped polygons, calculating the position of a kernel of the star-shaped polygon, and searching an edge of the-pattern in a direction connecting the kernel to an arbitrary point positioned on the edge of the approximate polygon.

CROSS REFERENCE TO RELATED APPLICATION

This application claims benefit of priority under 35USC § 119 toJapanese patent application No. 2002-239194, filed on Aug. 20, 2002, thecontents of which are incorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an extracting method of a patterncontour, an image processing method, a searching method of a patternedge, a scanning method of a probe, a manufacturing method of asemiconductor device, a pattern inspection apparatus, and program. Thepresent invention relates to, for example, evaluation of a fine patternin a manufacturing process of the semiconductor device.

2. Related Background Art

In a manufacturing process of a semiconductor device, an opticalmicroscope or a scanning electron microscope (hereinafter referred to asan SEM) is used to inspect a fine pattern.

In recent years, multifactorial inspection and control of patterns haveextensively implemented with a positive use of two-dimensionalconfiguration information of a pattern image outputted from aninspection apparatus. Basis of this technique is a technique ofextracting a contour of the pattern from an inspection image thereofgiven by a gray scale or color distribution.

For a simply linear pattern, for example, as shown in FIG. 43, a methodhas heretofore frequently been used comprising: searching an edge alongdirections SD202 vertical to a longitudinal direction of a linearpattern PT200; and analyzing gray scale data at the time to calculate anedge position based on a threshold value method.

In addition, for a pattern having a schematically convex shape, forexample, a hole pattern PT210 shown in FIG. 44, there is a method ofradially searching a pattern edge as shown by searching directions SD212in the drawing. This method is described, for example, in JapanesePatent Application Laid-Open Nos. 7-27548 and 2001-91231.

However, even with the use of the above-described method, edges of somepatterns are wrongly detected, for example, as patterns shown in FIG.45, the contour shape of which are complicated, and when the edges aresimply searched in directions SD214 extending in parallel with oneanother. Since an image Img2 in FIG. 45 includes a plurality of patternsPT2, PT4, PT6, the detected edges have to be attributed to any of thepatterns, respectively. For this, an operator needs to designate aregion where the pattern exists prior to the search of the patterns.Alternatively, the method has to comprise: performing image matchingwith design data to automatically attribute the edge; or again groupingextracted edge point sequence data. Any arrangement requires complicatedprocessing, inspection efficiency has thus not been satisfactory.

Furthermore, when a plurality of patterns similar to one another existin the image, it is frequently necessary to automatically andselectively designate a specific pattern from the plurality of patternsand to inspect the pattern. In this case, the method described, forexample, in Japanese Patent Application Laid-Open No. 2001-148016 can beused, but it is difficult to apply this method to cases other than acase in which the plurality of patterns are regularly arranged. Sincethe matching is performed by calculation of correlation among gray scaleimage data, a long processing time has been required.

There have been proposed a large number of methods of preferablydetecting a pattern edge for patterns having complicated contours. Inthe searching of the pattern edge, it is desirable to set the edgesearching direction to a direction substantially orthogonal to thepattern edge in order to enhance solution of the edge position.

However, even when an edge of a polygon PLG2 shown in FIG. 46 is set asa schematic pattern edge for a pattern PT44 shown in the figure, and aslong as the edge is searched in a direction along a straight line, theedge is searched in a direction similar to that of the edge as shown bysearching directions SD216 c, SD216 d. In this manner, it is sometimesdifficult to search the edges in directions crossing at right angles toall the pattern edges.

BRIEF SUMMARY OF THE INVENTION

According to a first aspect of the invention, there is provided anextracting method of a pattern contour, comprising:

acquiring an image of a pattern to be inspected;

calculating a schematic edge position of the pattern from the image;

preparing an approximate polygon by approximating a polygon consistingof edges having predetermined direction components to a contour shape ofthe pattern on the basis of the calculated edge position;

dividing the approximate polygon into star-shaped polygons;

calculating the position of a kernel of the star-shaped polygon; and

searching an edge of the pattern in a direction connecting the kernel toan arbitrary point positioned on the edge of the approximate polygon.

According to a second aspect of the invention, there is provided anextracting method of a pattern contour, comprising:

acquiring an image of a pattern to be inspected;

calculating a schematic edge position of the pattern from the image;

generating a lattice whose unit cell has a size larger than that of apixel of the image and to whose each edge a weight coefficient isallocated on the image on the basis of the calculated edge position;

applying a lattice animal onto the lattice based on the weightcoefficient; and

outputting contour data of the pattern based on coordinate data of avertex of the applied lattice animal.

According to a third aspect of the invention, there is provided aprogram which allows a computer to implement an extracting method of apattern contour, comprising:

acquiring an image of a pattern to be inspected;

calculating a schematic edge position of the pattern from the image;

preparing an approximate polygon by approximating a polygon consistingof edges having predetermined direction components to a contour shape ofthe pattern on the basis of the calculated edge position;

dividing the approximate polygon into star-shaped polygons;

calculating the position of a kernel of the star-shaped polygon; and

searching an edge of the pattern in a direction connecting the kernel toan arbitrary point positioned on the edge of the approximate polygon.

According to a fourth aspect of the invention, there is provided aprogram which allows a computer to implement an extracting method of apattern contour, comprising:

acquiring an image of a pattern to be inspected;

calculating a schematic edge position of the pattern from the image;

generating a lattice whose unit cell has a size larger than that of apixel of the image and to whose each edge a weight coefficient isallocated on the image on the basis of the calculated edge position;

applying a lattice animal onto the lattice based on the weightcoefficient; and

outputting contour data of the pattern based on coordinate data of avertex of the applied lattice animal.

According to a fifth aspect of the invention, there is provided amanufacturing method of a semiconductor device, comprising an extractingmethod of a pattern contour, the extracting method comprising:

acquiring an image of a pattern to be inspected;

calculating a schematic edge position of the pattern from the image;

preparing an approximate polygon by approximating a polygon consistingof edges having predetermined direction components to a contour shape ofthe pattern on the basis of the calculated edge position;

dividing the approximate polygon into star-shaped polygons;

calculating the position of a kernel of the star-shaped polygon; and

searching an edge of the pattern in a direction connecting the kernel toan arbitrary point positioned on the edge of the approximate polygon.

According to a sixth aspect of the invention, there is provided amanufacturing method of a semiconductor device, comprising an extractingmethod of a pattern contour, the extracting method comprising:

acquiring an image of a pattern to be inspected;

calculating a schematic edge position of the pattern from the image;

generating a lattice whose unit cell has a size larger than that of apixel of the image and to whose each edge a weight coefficient isallocated on the image on the basis of the calculated edge position;

applying a lattice animal onto the lattice based on the weightcoefficient; and

outputting contour data of the pattern based on coordinate data of avertex of the applied lattice animal.

According to a seventh aspect of the invention, there is provided animage processing method comprising:

acquiring an image of a pattern to be inspected;

extracting a part of a point sequence which belongs to a contour of thepattern;

preparing a Voronoi diagram with respect to the extracted partial pointsequence;

searching a point which belongs to an edge of the pattern along an edgeof the prepared Voronoi diagram to incorporate the searched point intothe partial point sequence; and

removing the edge of the Voronoi diagram intersecting with the contourof the pattern to define a sub-region in the image.

According to an eighth aspect of the invention, there is provided aprogram which allows a computer to implement an image processing methodcomprising:

acquiring an image of a pattern to be inspected;

extracting a part of a point sequence which belongs to a contour of thepattern;

preparing a Voronoi diagram with respect to the extracted partial pointsequence;

searching a point which belongs to an edge of the pattern along an edgeof the prepared Voronoi diagram to incorporate the searched point intothe partial point sequence; and

removing the edge of the Voronoi diagram intersecting with the contourof the pattern to define a sub-region in the image.

According to a ninth aspect of the invention, there is provided amanufacturing method of a semiconductor device, comprising an imageprocessing method including:

acquiring an image of a pattern to be inspected;

extracting a part of a point sequence which belongs to a contour of thepattern;

preparing a Voronoi diagram with respect to the extracted partial pointsequence;

searching a point which belongs to an edge of the pattern along an edgeof the prepared Voronoi diagram to incorporate the searched point intothe partial point sequence; and

removing the edge of the Voronoi diagram intersecting with the contourof the pattern to define a sub-region in the image.

According to a tenth aspect of the invention, there is provided asearching method of a pattern edge, comprising:

acquiring an image of a pattern to be inspected and data of a linerepresenting a schematic edge position of the pattern;

defining one arbitrary point in the image as a start point of edgesearching, and defining at least one point on the line as a point in anedge searching direction; and

searching the edge of the pattern from the start point of the edgesearching and along at least one curve of a curve group given by eithera real part or an imaginary part of a holomorphic function, a trajectoryof the curve passing through the point in the edge searching direction.

According to an eleventh aspect of the invention, there is provided aprogram which allows a computer to implement a searching method of apattern edge, the searching method comprising:

acquiring an image of a pattern to be inspected and data of a linerepresenting a schematic edge position of the pattern;

defining one arbitrary point in the image as a start point of edgesearching, and defining at least one point on the line as a point in anedge searching direction; and

searching the edge of the pattern from the start point of the edgesearching and along at least one curve of a curve group given by eithera real part or an imaginary part of a holomorphic function, a trajectoryof the curve passing through the point in the edge searching direction.

According to a twelfth aspect of the invention, there is provided amanufacturing method of a semiconductor device, comprising a searchingmethod of a pattern edge, the searching method including:

acquiring an image of a pattern to be inspected and data of a linerepresenting a schematic edge position of the pattern;

defining one arbitrary point in the image as a start point of edgesearching, and defining at least one point on the line as a point in anedge searching direction; and

searching the edge of the pattern from the start point of the edgesearching and along at least one curve of a curve group given by eithera real part or an imaginary part of a holomorphic function, a trajectoryof the curve passing through the point in the edge searching direction.

According to a thirteenth aspect of the invention, there is provided amethod of scanning a probe onto at least a part of an observation regionincluding a pattern to be inspected, comprising:

defining one arbitrary point in the observation region as a start pointof probe scanning, and defining at least one point on a linerepresenting the schematic edge position of the pattern as a point in aprobe scanning direction; and

scanning the probe from the start point of the probe scanning and alongat least one curve of a curve group given by either a real part or animaginary part of a holomorphic function, a trajectory of the scanningpasses through a point in the probe scanning direction.

According to a fourteenth aspect of the invention, there is provided aprogram to allow a computer to implement a method of scanning a probeonto a sample having an observation region, the computer controlling aninspection apparatus to generate the probe and to scan the probe onto atleast a part of the observation region in which the pattern to beinspected is formed, the scanning method comprising:

defining one arbitrary point in the observation region as a start pointof probe scanning, and defining at least one point on a linerepresenting a schematic edge position of the pattern as a point in aprobe scanning direction; and

scanning the probe from the start point of the probe scanning and alongat least one curve of a curve group given by either a real part or animaginary part of a holomorphic function, a trajectory of the scanningpasses through a point in the probe scanning direction.

According to a fifteenth aspect of the invention, there is provided amanufacturing method of a semiconductor device, comprising a method ofscanning a probe onto at least a part of an observation region in whicha pattern to be inspected is formed, the method of scanning the probeincluding:

defining one arbitrary point in the observation region as a start pointof probe scanning, and defining at least one point on a linerepresenting a schematic edge position of the pattern as a point in aprobe scanning direction; and

scanning the probe from the start point of the probe scanning and alongat least one curve of a curve group given by either a real part or animaginary part of a holomorphic function, a trajectory of the scanningpasses through a point in the probe scanning direction.

According to a sixteenth aspect of the invention, there is provided apattern inspection apparatus comprising:

a first calculator which receives data of an image of a pattern to beinspected and calculates a schematic edge position of the pattern fromthe image;

an image processor which approximates a polygon constituted of edgesexclusively having predetermined direction components to a contour shapeof the pattern based on the calculated edge position to prepare anapproximate polygon and which divides the approximate polygon intostar-shaped polygons;

a second calculator which calculates a position of a kernel of thestar-shaped polygon; and

an edge searcher which searches an edge of the pattern in a directionconnecting the kernel to an arbitrary point positioned on an edge of theapproximate polygon.

According to a seventeenth aspect of the invention, there is provided apattern inspection apparatus comprising:

a calculator which receives data of an image of a pattern to beinspected and calculates a schematic edge position of the pattern fromthe image;

an image processor which generates a lattice on the image based on thecalculated edge position, a unit cell of the lattice having a sizelarger than that of a pixel of the image and a weight coefficient beingallocated to each edge of the lattice, the image processor applying alattice animal onto the lattice based on the weight coefficient; and

an edge searcher which outputs contour data of the pattern based oncoordinate data of a vertex of the applied lattice animal.

According to an eighteenth aspect of the invention, there is provided apattern inspection apparatus comprising:

a point sequence extractor which receives data of an image of a patternto be inspected and which extracts a part of a point sequence belongingto a contour of the pattern;

an image processor which prepares a Voronoi diagram with respect to theextracted partial point sequence and which searches a point belonging tothe edge of the pattern along an edge of the prepared Voronoi diagram toincorporate the searched point into the partial point sequence and whichremoves an edge of the Voronoi diagram intersecting with the contour ofthe pattern to define a sub-region in the image; and

an edge searcher which searches the edge of the pattern for eachsub-region.

According to a nineteenth aspect of the invention, there is provided apattern inspection apparatus comprising:

a setter which receives data of an image of a pattern to be inspectedand data of a line representing a schematic edge position of the patternto set a start point of edge searching and at least one point on theline as the point in an edge searching direction in the image;

a calculator to calculate a curve group which is given by either a realpart or an imaginary part of a holomorphic function and each of whichpasses through the point in the edge searching direction from the startpoint; and

an edge searcher which searches an edge of the pattern along at leastone cure in the curve group.

According to a twentieth aspect of the invention, there is provided apattern inspection apparatus connectable to a probe scanning devicescanning a probe onto a sample in which a pattern to be inspected isformed, the pattern inspection apparatus comprising:

a calculator which receives image data of the pattern and data of a linerepresenting a schematic edge position of the pattern to calculate acurve group given by either a real part or an imaginary part of aholomorphic function and passing through at least one point on the linerepresenting the schematic edge position from the start point; and

a controller which generates a control signal to scan the probe along atleast one curve in the curve group and which supplies the control signalto the probe scanning device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart showing a schematic procedure of an extractingmethod of a pattern contour according to a first embodiment of thepresent invention, including an image processing method according to anembodiment of the present invention;

FIG. 2 is a flowchart showing procedures to arrange a lattice animal inthe flowchart of FIG. 1 in more detail;

FIG. 3 is a diagram showing one example of a pattern image;

FIG. 4A schematically shows edge data of a horizontal direction incoordinate data of a pattern edge extracted from the image shown in FIG.3, and FIG. 4B schematically shows the edge data of a vertical directionin the coordinate data of the pattern edge extracted from the imageshown in FIG. 3;

FIGS. 5A and 5B are diagrams showing results of discriminant analysis ofthe coordinate data shown in FIGS. 4A and 4B;

FIG. 6 is a diagram in which horizontal components and verticalcomponents shown in FIGS. 5A and 5B are synthesized;

FIG. 7 is a diagram showing a lattice prepared in the image coordinatesystem from the judgment result shown in FIG. 6;

FIG. 8A shows one representation example of a chain code, and FIGS. 8Bto 8E are diagrams showing some examples of the lattice animal;

FIG. 9 is an explanatory view of the specific procedure of the method ofdisposing the lattice animal on the lattice shown in FIG. 7;

FIG. 10 is a diagram showing an optimum arrangement result of thelattice animal onto the lattice shown in FIG. 7;

FIG. 11 shows Voronoi diagram prepared with respect to vertices of thelattice animal shown in FIG. 10;

FIG. 12 is a diagram in which the Voronoi diagram shown in FIG. 11 issynthesized;

FIG. 13 is a diagram in which a part of vertex data is removed from thediagram shown in FIG. 12;

FIG. 14 is a diagram showing a result of a process of dividing an animalwhich exists in one sphere of influence of the diagram shown in FIG. 13into triangles and point-coloring each vertex;

FIG. 15 is a diagram showing a result of star-shaped (convex type)polygon division of the animal arrangement obtained from the imageprocessing result shown in FIG. 14;

FIG. 16 is a diagram showing kernels of the star-shaped polygon shown inFIG. 15 and edge searching directions from these kernels;

FIG. 17 is a diagram showing one example of the image including aplurality of patterns which have schematically convex contours;

FIG. 18A shows data of edge components of a horizontal direction in thecoordinate data of the pattern edge extracted from the image shown inFIG. 17, and FIG. 18B shows the data of the edge components of avertical direction in the coordinate data of the pattern edge extractedfrom the image shown in FIG. 17;

FIG. 19A shows a lattice generated by classifying the edge componentsshown in FIGS. 18A and 18B, and FIG. 19B shows the animal arrangementobtained by referring to an animal table;

FIG. 20A shows a Voronoi diagram prepared with respect to the vertex ofthe animal shown in FIG. 19B, and FIG. 20B shows a Voronoi diagram inwhich Voronoi regions of FIG. 20A are integrated;

FIG. 21 is a diagram showing the edge searching directions from thekernels inside the animals in the regions shown in FIG. 20B;

FIG. 22A is a diagram showing one example of the lattice animalarrangement obtained from the image including a single pattern only, andFIG. 22B is a diagram showing a result of triangulation of the latticeanimal arrangement shown in FIG. 22A;

FIG. 23A shows a result of the point coloring performed with respect tothe vertices of triangles obtained in FIG. 22B, and FIG. 23B is adiagram showing the result of kernel calculation performed with respectto the star-shaped polygon obtained from the triangles shown in FIG.23A;

FIG. 24 is a flowchart showing a schematic procedure of an imageprocessing method in a fourth embodiment of the present invention;

FIGS. 25A to 25D are diagrams showing specific examples of the imageprocessed by the procedure shown in FIG. 24;

FIGS. 26A to 26E are diagrams showing the specific examples of the imageprocessed by the procedure shown in FIG. 24;

FIG. 27 is a flowchart showing the schematic procedure of the imageprocessing method in a fifth embodiment of the present invention;

FIGS. 28A to 28D are diagrams showing the specific examples of the imageprocessed by the procedure shown in FIG. 27;

FIGS. 29A to 29C are diagrams showing the specific examples of the imageprocessed by the procedure shown in FIG. 27;

FIGS. 30A and 30B are diagrams showing the specific examples of theimage according to a sixth embodiment of the present invention;

FIG. 31 is a flowchart showing the schematic procedure of the imageprocessing method in a seventh embodiment of the present invention;

FIGS. 32A to 32E are diagrams showing some examples of the imageprocessed by the procedure shown in FIG. 31;

FIG. 33 is a flowchart showing the schematic procedure of the imageprocessing method in an eighth embodiment of the present invention;

FIGS. 34A to 34F are explanatory views specifically showing the imageprocessing method shown in FIG. 33;

FIGS. 35A to 35E are explanatory views showing a method of furtherfacilitating matching of Voronoi diagrams with one another;

FIGS. 36A to 36F are explanatory views of a method of automaticallyfinding a specific part from the image;

FIG. 37 is a flowchart showing the schematic procedure of an edgesearching method in a ninth embodiment of the present invention;

FIGS. 38A to 38C are diagrams showing in more detail the edge searchingmethod shown in FIG. 37;

FIG. 39 is a flowchart showing the schematic procedure of the edgesearching method in a tenth embodiment of the present invention;

FIGS. 40A and 40B are diagrams showing in more detail the edge searchingmethod shown in FIG. 39;

FIG. 41 is a flowchart showing the schematic procedure of a probescanning method and the edge searching method in an eleventh embodimentof the present invention;

FIG. 42 is a block diagram showing a schematic constitution of a patterninspection apparatus according to a twelfth embodiment of the presentinvention;

FIG. 43 is a diagram showing one example of a linear pattern and showingan extracting method of a pattern contour according to a related art;

FIG. 44 is a diagram showing one example of a hole pattern and showingthe extracting method of the pattern contour according to the relatedart;

FIG. 45 is a diagram showing one example of a complicated pattern andshowing a problem of the related art; and

FIG. 46 is an explanatory view of the problem of a pattern edgesearching method according to the related art.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the present invention will be described hereinafter withreference to the drawings.

In the following description, first to eighth embodiments relate to anextracting method of a pattern contour, including an image processingmethod according to the present invention, and ninth and tenthembodiments relate to a searching method of a pattern edge according tothe present invention. An eleventh embodiment relates to a scanningmethod of a probe according to the present invention. A twelfthembodiment relates to a pattern inspection apparatus according to thepresent invention. A thirteenth embodiment relates to a manufacturingmethod of a semiconductor device according to the present invention.Furthermore, a fourteenth embodiment relates to program and computerreadable recorded medium according to the present invention. It is to benoted that in the following drawings, the same elements are denoted withthe same reference numerals, and detailed descriptions thereof areappropriately omitted.

(1) First Embodiment

A first embodiment of the present invention will be described withreference to FIGS. 1 to 16.

FIG. 1 is a flowchart showing a schematic procedure of the extractingmethod of a pattern contour according to the present embodiment, andFIG. 2 is a flowchart showing procedures to arrange a lattice animal inthe flowchart of FIG. 1 in more detail.

First of all, the extracting method of the pattern contour of thepresent embodiment will schematically be described with reference to thefollowing of FIG. 1.

First, data of a gray scale image of a pattern to be inspected isacquired, for example, by an SEM (step S1). One example of the acquiredpattern image is shown in FIG. 3. An image Img2 shown in the figure isthe same as that shown in FIG. 45, and includes three patterns PT2, PT4,PT6. Of these patterns the pattern PT2 has a contour which cannot beregarded as a convex shape.

Next, vertical components and horizontal components of the pattern imageare searched (step S2). Specifically, a gray scale data is scanned in avertical direction and a horizontal direction in the image Img2 tocalculate coordinates of the horizontal and vertical directions of localpeaks in tone thereof. FIGS. 4A and 4B are diagrams visibly showing thecalculated coordinates. FIG. 4A schematically shows edge data of thehorizontal direction obtained by searching the edges of the verticaldirection, and FIG. 4B schematically shows the edge data of the verticaldirection obtained by searching the edges of the horizontal direction.More specifically, the peaks are searched at an interval of ten pixelsin the vertical and horizontal directions to obtain a smootheddifferential value of the gray scale data obtained in the respectivesearches and to specify a position in the vicinity of a maximum value.

Next, discriminant analysis to the obtained vertical and horizontalcoordinates is performed (step S3). Steps are performed comprising:regarding two positions as the same, when F value defined by thefollowing equation (1) is not more than a predetermined value; and onthe other hand, regarding the positions as independent positions, whenthe F value exceeds the predetermined value.F=V _(int er) /V _(int ra)   Equation (1),whereinV _(int er)=Var( x ₁, x ₂, x ₃, . . . , x _(N))V _(int ra)=Ave(V ₁ ,V ₂ , . . . ,V _(N)),x ₁, x ₂, x ₃, . . . , x _(N) and V₁,V₂, . . . ,V_(N) indicate anaverage value and variance of an x coordinate of each class, when asequence of points is rearranged in accordance with a size of the xcoordinate and thereafter the sequence is divided into N classes. Thisvalue at a time when F is maximized gives the positions of the verticalcomponents of the pattern edge after the discriminant analysis.

It is to be noted that Var( ) means the calculation of variance of thevalue within ( ), and Ave( ) means the calculation of the average valuewithin ( ).

Furthermore, the calculation is also similarly performed with respect toa y coordinate of the sequence of points.

FIGS. 5A and 5B show discriminant analysis results of the coordinatedata shown in FIGS. 4A and 4B, respectively. FIG. 5A shows thehorizontal components of the pattern edge, and FIG. 5B shows thevertical components of the pattern edge. Furthermore, FIG. 6 is adiagram in which the horizontal components of FIG. 5A are synthesizedwith the vertical components of FIG. 5B.

Next, the lattice is generated on the image using the result of thediscriminant analysis (step S4). Specifically, the vertical andhorizontal coordinates finally regarded as independent positions shownin FIG. 6 are used to generate a lattice L2 on the image as shown inFIG. 7. In this stage, the lattice L2 is a polygon having edges to whichpredetermined direction components are given. In the present embodimentall the predetermined direction components are the horizontal andvertical components. Furthermore, a length Lij and weight function wijare imparted to each edge of the lattice L2, and stored as table data ina storage device (see FIG. 42). Here, the weight function wij is afunction which can be expressed in the following equation (2) with thenumber nij of local peaks of gray scale value data attributed to eachedge of the lattice L2.wij=nij/Lij   Equation (2)It is to be noted that the predetermined direction components are notlimited to the horizontal and vertical components. The direction mayform an angle integer times as much as 0° to 45° with respect to areference direction which can arbitrarily be set to an image direction.

Next, a polygon referred to as “lattice animal” is combined on thelattice L2 generated on the image Img2 in this manner (step S5). Here,the “lattice animal” means a polygon prepared by disposing the edges ofthe arbitrary number of lattice elements adjacent to one another tosynthesize the elements. A method of automatically generating thepolygon is described, for example, in Discrete Mathematics 36 (1981) pp.191 to 203 by D. H. Redelmeier, “Introduction to Percolation Theory” byD. Stauffer, Taylor & Francis, London & Philadelphia, 1985 appendix Aand the like. In the present embodiment, necessary number of latticeanimals is beforehand generated, and the contours of the animals arerepresented by chain codes described in Computing Surveys, vol. 6, No.1, pp. 57 to 97 (1974) by H. Freeman. Then, the animals are numberedwith the numbers of longitudinal and lateral edges, and beforehandstored as an “animal table” in the storage device (see FIG. 42). Onerepresentation example of this chain code is shown in FIG. 8A, and someexamples α1 to α4 of the lattice animal are shown in FIGS. 8B to 8E.

A specific procedure for superposing the lattice animals upon oneanother will be described with reference to FIGS. 2, 9, and 10. First,one arbitrary lattice point A is selected from all the lattice points(FIG. 2, step S501). Explaining the lattice L2 shown in FIG. 7 as anexample, a lattice point p2, for example is selected as shown in FIG. 9.Next, an arbitrary lattice animal a is selected from the “animal table”(FIG. 2, step S502). In the example shown in FIG. 9, a lattice animalα10 is selected as the lattice animal a. Next, the lattice (lattice L2in FIG. 9) is traced from the selected lattice point A by the chain codeof the selected lattice animal. At this time, the pre-stored weights aresuccessively added to the respective edges of the traced lattice, andthe added result is defined as an existence probability Ra of thelattice animal a and then stored in the storage device (see FIG. 42)(step S503). Next, another lattice point B is selected from the latticepoints which do not belong to the lattice animal which has alreadyselected (step S504). In the example shown in FIG. 9, for example, alattice point p4 is selected from the lattice points not belonging tothe lattice animal α10 whose start point is the lattice point p2. Next,another arbitrary lattice animal is selected newly as a lattice animal bfrom the animal table (step S505). As an example of the lattice animalb, FIG. 9 shows a lattice animal α12. Subsequently, the lattice istraced from a lattice point B by the chain code corresponding to thelattice animal b (step S506). In the example shown in FIG. 9, thelattice point p4 is used as the start point to trace the lattice L2 bythe chain code of the lattice animal α12. Additionally, at this time,when the lattice point or edge belonging to the lattice animal b (α12 inthe example of FIG. 9) is already occupied by another lattice animal(e.g., the lattice animal α10 of FIG. 9) (step S507), the currentlattice animal b (lattice animal α12 in FIG. 9) is discarded (stepS508), and one lattice animal b is selected newly (step S505). When thelattice point or edge belonging to the existing lattice animal b is notoccupied by another lattice animal yet (step S507), the lattice istraced from the lattice point B with the chain code corresponding to thelattice animal b, and an existence probability Rb is calculated andstored in the storage device (see FIG. 42) (step S509).

When the above-described procedures (steps S505 to S509) are recursivelyrepeated for the whole lattice (step S510), the animals are disposed inthe whole lattice. As a result, the calculated existence probabilitiesare obtained for all the lattice animals disposed in the whole latticeat this time.

Next, an integrated value of all the existence probabilities withrespect to all the lattice animals calculated in this manner iscalculated and defined as an integrated value T. Furthermore, latticeanimal arrangement information is constituted by the number of latticeanimals, the start point coordinate of each lattice animal, thenumerical order of each lattice animal, and the integrated value T andprovided with a label (e.g. label C1), and the information is stored inthe storage device (see FIG. 42) (step S511).

Next, when the lattice animal which can be disposed using the latticepoint A as the start point exists in the animals other than the latticeanimal a (step S512), the lattice animal is newly selected as thelattice animal a (step S513), and the above-described steps S502 to S511are repeated.

Furthermore, if there are lattice points which have not been selected asthe lattice point A yet in all the lattice points (step S514), one ofthe points is newly selected as the lattice point A (step S515), and theabove-described steps S502 to S513 are repeated.

By the repetition of these procedures, the integrated value T of theexistence probabilities can be obtained with respect to a way ofarrangement of all the lattice animals which can be arranged in thewhole lattice.

Finally, the arrangement of the lattice animals in which a maximum valueof T is obtained is selected from all the arrangement of the latticeanimals (step S516).

One example of the animal arrangement finally selected in this manner isshown in FIG. 10. As shown in the drawing, outlines RF2, RF4, and RF6 ofthe contours of the patterns were calculated by a figure constitutedonly of the horizontal/vertical edges.

Turning back to FIG. 1, a Voronoi diagram is prepared with respect tothe vertices of each lattice animal existing on the outer periphery withrespect to the outlines of the pattern contours constituted by theabove-described procedure (step S6). FIG. 11 shows a Voronoi diagram VF2prepared in this manner.

Next, as shown in FIG. 12, the Voronoi regions including the verticesattributed to the same animal are synthesized with respect to therespective Voronoi regions of the prepared Voronoi diagram VF2, andboundaries of synthesized regions AR2, AR4, AR6 are defined as thespheres of influence of the respective animals to obtain the boundariesin searching the edge as described later (step S7).

Subsequently, as shown in FIG. 13, the vertices of the lattice animalwhich do not exist in corners are removed.

Next, one of the regions AR2, AR4, AR6 divided in this manner by theVoronoi diagram is selected (step S8), all diagonal lines which do notintersect with one another are drawn in the animal existing in theregion, and the animal is divided into triangles (step S9). Furthermore,the respective vertices of the animal are point-colored in red (R),green (G), and blue (B) following a description order of the chain code(step S10). At this time, the respective vertices of the triangles arecolored in such a manner that the vertices disposed adjacent to eachother via one edge do not have the same color. FIG. 14 shows a result ofthe dividing and point-coloring of the animal in this manner withrespect to the region AR of FIG. 13.

Subsequently, the triangles which share the vertex colored in R aresynthesized to prepare a new figure SP4 as shown in FIG. 15. The animalarrangement was thus divided into the star-shaped (convex herein)polygon (step S11).

Subsequently, the position coordinate of a core (kernel) is calculatedby algorithm of Lee-Preparata described in Info. Proc. Lett. 7, pp. 189to 192 (1978) with respect to each star-shaped polygon (step S12). Asshown in FIG. 16, the gray scale value of an original image issuccessively checked from the positions of kernels CN2, CN4 toward theouter periphery of the lattice animal (searching directions SD2 a to SD2c) in a chain code order of the animal (see FIG. 8A) to the boundary ofthe sphere of influence (SP4 in FIG. 16) of the lattice animal. Thepattern edge position is calculated in accordance with the existing edgesearching method, and each calculated edge position is stored in thestorage device (see FIG. 42) (step S13). In this case, when a pluralityof edges are detected, only one edge closest to the position of thekernel is selected. In the present embodiment, a threshold value methodwas used, and a threshold value was set to 50%. By this procedure, edgepoint sequence data remarkably close to an actual pattern edge positionis calculated in the form of chain arrangement in one region. To searchthe edge using the respective kernels CN2, CN4 as the start points, whenthe embodiment of the searching method of the pattern edge according tothe present invention described later is used in addition to theabove-described method, the position of the edge can further preciselybe calculated.

Subsequently, the steps S8 to S13 are also performed with respect to theother spheres of influence (FIG. 13, AR4, AR6) (steps S14, S15), and thecontour data of all the patterns included in the image is labeled andoutputted (step S16). Accordingly, for example, the threshold valuemethod can be used to exactly calculate the contour data of all thepatterns in the image to be inspected without any wrong detection.

According to the present embodiment, it is possible to output patternedge data in the form of the chain arrangement for each independentpattern from image data including the pattern in a complicated shapewithout performing the intricate image matching, referring to enormousamounts of CAD data, or manually dividing the region.

There exists a high-rate algorithm of the order of O (nlogn) (n denotesthe number of vertices of the figure which is the object) or less forall the procedures of the Voronoi diagram preparation, the star-shapedpolygon generation, the searching of the kernel and the edge searchingwhich are used in the present embodiment. Therefore, by the use of thealgorithm, an image processing time can largely be reduced.

It is to be noted that in the present embodiment, a smoothingdifferential calculus was used in searching the horizontal/verticalcomponents of the edges, the methods such as the threshold value methodor a subtractive color process may also be used instead. In the presentembodiment, the Voronoi diagram was prepared to generate the sphere ofinfluence of the plurality of patterns existing in the image. However,when there is only one pattern in the image, or when the region isdesignated beforehand, this region division is unnecessary. Furthermore,when the contour data does not require high accuracy, the animalarrangement is accepted to obtain the calculated maximum integratedvalue T up to the step S5 of FIG. 1, and the vertex coordinate of theanimal may also be used as the contour data of the pattern as such.

(2) Second Embodiment

Next, a second embodiment of the present invention will be describedwith reference to FIGS. 17 to 21.

In the present embodiment, there is provided an extracting method of thepattern contour in a case in which a plurality of patterns having thecontours of schematically convex types exist on the image. In this case,since the kernel can also be set in any position in the pattern, thedividing procedure into the star-shaped polygon in the first embodiment(FIG. 1, steps S9 to S11) can be omitted.

FIG. 17 shows one example of the image including a plurality of patternsPT32 which have schematically convex contours ED.

In the same manner as in the first embodiment, for example, aninspection object image Img4 is acquired, and the edge components in thehorizontal and vertical directions of the image Img4 are extracted asshown in FIGS. 18A and 18B (FIG. 1, step S2).

Next, the extracted edge components are classified into four levels inthe vertical direction and ten levels in the horizontal direction, alattice L4 is generated based on a schematic edge position as shown inFIG. 19A, and further the animal table is referred to in calculating ananimal arrangement (AD4) having a higher probability as shown in FIG.19B.

Next, a Voronoi diagram VF8 is prepared with respect to the vertex ofthe animal as shown in FIG. 20A, and further the regions belonging tothe same animal are unified to define a new Voronoi region AR8 as shownin FIG. 20B.

Furthermore, as shown in FIG. 21, the pattern edges are searched alongradial directions SD6 toward each boundary from one point (kernel)inside the animal in each region, and the contour data is extracted.With regard to search of the edge from each kernel which is the startpoint, the searching method of the pattern edge according to theembodiment of the present invention described later can be used inaddition to the method according to the related art. In this case, theposition of the edge can more precisely be calculated.

As described above, according to the present embodiment, when aplurality of patterns having the contours of the schematic convex typesexist on the image, it is possible to accurately acquire the data of thepattern contour in a simpler procedure.

(3) Third Embodiment

A third embodiment of the present invention will be described withreference to FIGS. 22A to 24. In the present embodiment, there isprovided an extracting method of the pattern contour, in which theacquired image includes the single pattern only but the contour of thepattern is not regarded as the convex shape.

First, the schematic contour of the pattern to be inspected isrepresented by the lattice animal in a procedure similar to that of thefirst embodiment (FIG. 1, steps S1 to S5). As a result, one example ofthe lattice animal arrangement is obtained with respect to the singlepattern. One example of the lattice animal arrangement thus obtained isshown in FIG. 22A. In the present embodiment, since only the pattern tobe inspected is included in the image, it is not necessary to calculatethe sphere of influence of the pattern any more. Therefore, theprocedure for calculating the Voronoi diagram (FIG. 1, steps S6 to S8)can be omitted.

The diagonal lines are drawn with respect to the obtained lattice animalto perform the triangulation (FIG. 1, step S9). A lattice animal AD6shown in FIG. 22A can be divided into the triangles, when twelvediagonal lines DL11 to DL22 are drawn as shown in FIG. 22B.

Subsequently, in the same manner as in the first embodiment, thevertices of each triangle are point-colored in three colors as shown inFIG. 23A (FIG. 1, step S10), and further the triangles sharing thevertex colored, for example, in R are integrated to perform the divisionby the star-shaped polygon (FIG. 1, step S11). Subsequently, theposition of each kernel is calculated with respect to each star-shapedpolygon in the same manner as in the first embodiment (FIG. 1, stepS12). Accordingly, as shown in FIG. 23B, the start point of the edgesearching and the edge searching region without any wrong detection wereobtained.

Thereafter, although not especially shown, in the same manner as in thefirst embodiment, the edge is searched toward the outer periphery ofeach star-shaped polygon from each kernel (see FIG. 1, step S13).

As described above, according to the present embodiment, even with thepattern including the contour which cannot be regarded as the convexshape, when the image including the single pattern only is obtained, thedata of the pattern contour can be acquired by a simpler procedure andfor a shorter inspection time. It is to be noted that for the edgesearching, with the use of the searching method of the pattern edgeaccording to the embodiment of the present invention described later,the edge position can further precisely be detected.

(4) Fourth Embodiment

A fourth embodiment of the present invention will be described withreference to FIGS. 24 to 26. FIG. 24 is a flowchart showing a schematicprocedure of the extracting method of the pattern contour including theimage processing method of the present embodiment, and FIGS. 25A to 26Eshow examples of the image processed by the procedure shown in FIG. 24.

First, the gray scale image data of the pattern which is the object ofthe inspection is acquired, for example, by SEM (FIG. 24, step S30). Oneexample of the acquired image data is shown in FIG. 25A. An image Img6shown in the drawing includes eleven patterns in total includingpatterns PT8, PT14, PT16 having the contours which cannot be regarded asthe convex shapes.

Next, as shown in FIG. 25B, a pattern edge EP2 is searched along aboundary AR26 of the inspection image Img6 (step S31). To search thepattern edge, the smoothing differential calculus was used to define thepeak position after the smoothing differentiation as the pattern edge.

Next, a Voronoi diagram VF10 is prepared with respect to the edge pointEP2 found on the boundary AR26 as shown in FIG. 25C (step S32).

Next, as shown in FIG. 25D, the edge searching by the smoothingdifferentiation is again performed along each edge of the Voronoidiagram VF10 (step S33).

Next, the edge including a pattern edge point EP4 is removed from therespective edges of the Voronoi diagram VF10 (steps S 36, S37), andfurther isolated edges and branches are removed (step S38). Accordingly,as shown in FIG. 26A, the whole gray scale image Img6 is divided intofive regions RG1 to RG5.

Next, with respect to the respective regions RG1 to RG5, in the samemanner as in the steps S31 and S32, the edge point is searched along theboundary of the region (step S40), and the Voronoi diagram is preparedwith respect to the searched edge point sequence again (step S41). FIG.26B representatively shows a Voronoi diagram VF12 a prepared again withrespect to the lower region RG3.

Next, the edge is searched along a Voronoi edge in the same manner as inthe step S32 (step S42). An edge point EP6 obtained as a result of theedge searching is shown in FIG. 26C.

Next, the Voronoi edges, and the isolated edges and branches includingthe edge point EP6 are removed in the same manner as in the steps S36 toS38 (steps S43 to S45). As a result, as shown in FIG. 26D, the originalregion RG3 is further divided into three regions RG6 to RG8.

Furthermore, the above-described procedure is recursively performed withrespect to all the divided regions, until the shape of each dividedregion becomes unchanged (steps S48, S49, S40 to S47). As a result, asshown in FIG. 26E, the pattern image Img6 was divided into a largenumber of regions RG1, RG2, RG4 and RG5, RG7 to RG15 so that each regionfinally includes one pattern edge.

As described above, according to the present embodiment, with theinspection image including a plurality of patterns including thepatterns having the contours which cannot be regarded as the convexshape, the inspection image can be divided so as to include each patternedge.

Finally, the searching method of the pattern edge in the first to thirdembodiments is used to search the edge for each region. Accordingly, allthe pattern edges can be acquired as the chained arrangement data foreach region. It is to be noted that with the use of the pattern edgesearching method in ninth and tenth embodiments described later, theedge position can more precisely be calculated.

(5) Fifth Embodiment

Next, a fifth embodiment of the present invention will be described withreference to FIGS. 27 to 29C. FIG. 27 is a flowchart showing theschematic procedure of the image processing method in the presentembodiment. FIGS. 28A to 28D and FIGS. 29A to 29C are diagrams showingthe examples of the image processed by the procedure shown in FIG. 27.According to the present embodiment, there is provided the extractingmethod of the pattern contour including the image processing method in acase in which the pattern edge intersecting with the boundary of theacquired gray scale image does not exist in the image.

First, after acquiring an image Img8 of the pattern as shown in FIG. 28A(FIG. 27, step S51), as shown in FIG. 28B, first edge searching isperformed in a longitudinal direction SD10 over the whole image Img8 andin a lateral direction SD8 over the whole image Img8 (step S52). In thepresent embodiment, each edge direction is set in a position where alength and width of the image Img8 are divided at a golden ratio, but itis possible appropriately change the position and number of thedirection.

As a result of the edge searching, the position coordinate of patternedges EP8 was obtained as shown in FIG. 28C.

Next, the Voronoi diagram VF is prepared with respect to the searchededge point (step S53). For the prepared Voronoi diagram, as in VF14shown in FIG. 28D, substantially parallel straight lines are obtained.

Next, the edge is searched along the Voronoi edge of the preparedVoronoi diagram (step S54), and further the Voronoi diagram is preparedwith respect to obtained edge points EP10 (step S55). As a result, aVoronoi diagram VF16 shown in FIG. 29A was obtained.

Next, as shown in FIG. 29B, the edge searching is performed along theedges of the Voronoi diagram VF16 again (step S56), the Voronoi edgesincluding searched edge points EP12 are deleted (steps S57, S58), andfurther the isolated edge and branch are removed (step S59). As aresult, as shown in FIG. 29C, the image Img8 is divided into sub-regionsRG21 to RG24 each including one curve constituted of the sequence ofedge points.

Thereafter, the searching method of the pattern edge in the secondembodiment is used to perform the edge searching for each region.Accordingly, all the pattern edges can be acquired as the chainedarrangement data for each region. It is to be noted that the searchingmethod of the pattern edge in the ninth and tenth embodiments describedlater can be used to more precisely calculate the position of the edge.

(6) Sixth Embodiment

Next, a sixth embodiment of the present invention will be described.According to the present embodiment, there is provided the extractingmethod of the pattern contour including another image processing methodin a case in which the pattern edge intersecting with the boundary doesnot exist in the acquired image.

For example, the pattern edge intersecting with the boundary of theimage Img8 does not exist as shown in FIG. 30A. In this case, an opticalmicroscope used in acquiring the image or SEM whose magnification is setto be higher is used to acquire the image again. Then, as shown in FIG.30B, an image Img9 is obtained whose pattern edge intersects with theboundary. Therefore, thereafter, the image processing in the first tofourth embodiments is used to divide the region in such a manner thateach region includes the single pattern only. Moreover, by the edgesearching method in the first to third embodiments or in the ninth ortenth embodiment described later, the edge position may be detected.

(7) Seventh Embodiment

FIG. 31 is a flowchart showing the schematic procedure of the imageprocessing method in a seventh embodiment, and FIGS. 32A to 32E show theexamples of the image processed by the procedure shown in FIG. 31.

According to the present embodiment, a step of searching the patternedge in the longitudinal and lateral directions at an interval which isabout half of a minimum pattern pitch beforehand in the whole acquiredimage is added to the fourth embodiment. That is, as shown in FIG. 32A,the pattern edge is searched in a longitudinal direction SD12 andlateral direction SD14 at an interval which is about half of the minimumpattern pitch in the whole gray scale image Img6 (FIG. 31, step S62).

Thereafter, in the same manner as in the fourth embodiment, theprocedures of: the generation of the Voronoi diagram VF16 (FIG. 32B)(FIG. 31, step S63); the edge searching along the Voronoi edge (FIGS.32C, 31, steps S64 and S65); and the integration of the Voronoi regionsand the removing of the branches (FIGS. 32D, 31, steps S66 to S68) arerecursively repeated (steps S 69 to S72, S63 to S68).

As described above, according to the present embodiment, since a largenumber of point sequences belonging to the pattern edge are obtainedbeforehand in step S62, the procedure for recursion can largely beomitted. For example, in comparison of FIG. 31 with FIG. 24, the stepsS33 to S38, S40 and S41 of FIG. 24 are not necessary. Even by thissimple procedure, as shown in FIG. 32E, the image Img6 can be dividedinto nine regions RG31 to RG39 so that the single pattern only isincluded in each region.

After the image processing by the above-described procedure, when thesearching method of the pattern edge in the first or third embodiment orin the ninth or tenth embodiment described later is used to search theedge for each region, all the pattern edges can be acquired as thechained arrangement data for each result.

(8) Eighth Embodiment

According to an eighth embodiment, there is provided a method ofapplying the result of the division into the regions by the first toseventh embodiments to pattern matching.

FIG. 33 is a flowchart showing the schematic procedure of the imageprocessing method in the eighth embodiment. FIGS. 34A to 34F areexplanatory views specifically showing the image processing method shownin FIG. 33.

First, a reference image is acquired as a reference of pattern materialfrom CAD data with respect to the pattern of the inspection object (FIG.33, step S81). One example of the reference image is shown in FIG. 34A.In the drawing, a reference image Rimg10 includes six hole patternsPT30, PT32, PT34, PT36, PT38, PT40. In these patterns, the pattern PT30in a circled position in FIG. 34A is designated as the inspection objectpattern (FIG. 33, step S82).

Next, with respect to the whole reference image Rimg10, as shown in FIG.34B, in the same manner as in the fifth embodiment, a Voronoi diagramVF18 is prepared so that each region includes the single pattern (FIG.33, step S83), and the respective vertices are numbered with {circlearound (1)} to {circle around (10)} (FIG. 33, step S84).

Next, the inspection image including the hole pattern PT38 which is theinspection object is acquired (FIG. 33, step S85). The example Img10 ofthe inspection image is shown in FIG. 34C.

Next, also with respect to the inspection image Img10, in the samemanner as in the reference image Rimg10, the Voronoi diagram is preparedso that each region includes the single pattern only (FIG. 33, stepS86), and the respective vertices are numbered with {circle around (1)}to {circle around (10)} (FIG. 33, step S87). The result is shown in FIG.34D. It is to be noted that in the present embodiment the way of thenumbering of the reference image Rimg10 is not especially associatedwith that of the inspection image Img10.

Next, there are extracted the Voronoi diagram VF18 of the referenceimage Rimg10 and a Voronoi diagram VF20 of the object image Img10 only,and rotary movement or translational movement is relatively performed sothat the position of the edge of the Voronoi diagram VF18 may be closestto that of the Voronoi diagram VF20 of the object image, therebyassociating the Voronoi vertices with one another (step S88).

Thereafter, as shown in FIG. 34E, a region RG42 corresponding to aVoronoi region RG40 (dotted area) including the inspection objectpattern PT30 in the reference image Rimg10 is defined in the inspectionimage Img10 (step S89).

Finally, as shown in FIG. 34F, the pattern included in the region RG42defined in the inspection image Img10 is determined as the inspectionobject pattern PT30 in the inspection image (step S90).

In the example shown in FIGS. 34A to 34F, the Voronoi diagrams werematched with one another so as to minimize a residual of the positionsof the edges. However, when the number of patterns included in the imageincreases or becomes complicated, the calculation requires much time inthis method. In this case, when only connectivity of the Voronoi regionsis noticed, the pattern matching can be performed more simply.

FIGS. 35A to 35E are explanatory views of this simple matching method.First, as shown in FIGS. 35A and 35B, the Voronoi diagrams of Rimg10 andImg10 shown in FIGS. 34B and 34D are rewritten to graphs VF19 and VF21in which the length of each edge is neglected. Here, the inspectionobject pattern PT30 designated beforehand exists in a square whosevertices are points {circle around (2)}, {circle around (3)}, {circlearound (7)}, and {circle around (5)} in a reference image RImg11.

Next, the graph VF21 of FIG. 35B corresponding to the inspection imageImg10 is rotated/translated so as to agree with the graph VF19 of FIG.35A. In the present embodiment, when the graph VF21 of FIG. 35B isrotated by about 90° in a clockwise direction, a graph VF22 shown inFIG. 35C is acquired.

Next, in the graph VF22, the vertices to define a part corresponding tothe region to be inspected in the graph VF19 in the reference image ofFIG. 35A are acquired. As a result, as shown in FIG. 35D, a regionsurrounded with vertices {circle around (3)}, {circle around (9)},{circle around (5)}, and {circle around (2)} is obtained.

As described above, the pattern in the region surrounded with thevertices {circle around (3)}, {circle around (9)}, {circle around (5)},and {circle around (2)} in the original Voronoi diagram VF20 shown inFIG. 35E can be identified as the inspection object pattern.

According to the image processing method of the present embodiment, itis also possible to automatically find a specific part from the image.This respect will be described in more detail with reference to FIGS.36A to 36F.

A partial region Rimg10 a is cut out beforehand from the reference imageRimg10 shown in FIG. 36A as shown in FIG. 36B, and thereafter theVoronoi diagram is prepared with respect to the whole reference imageRimg10 together with the cut-out region Rimg10 a. FIG. 36C shows aVoronoi diagram VF18 a prepared with respect to the cut-out regionRimg10 a.

Subsequently, with respect to the image to be inspected Img10 (FIG.36D), the Voronoi diagram VF20 is also prepared (FIG. 36E).

Next, a part whose geometric position most agrees with that of theVoronoi diagram VF18 a shown in FIG. 36C is searched in the Voronoidiagram VF20 of the image to be inspected Img10. As shown in FIG. 36F, arectangular region RG42 circumscribed with the Voronoi diagram VF18 acan be defined as the region which includes the pattern to be inspectedin the image to be inspected Img10.

According to the present embodiment, it is possible to execute a patternmatching in which irregular arrangement information of a pattern is usedas a template. Therefore, when a plurality of the same patterns exist inthe inspection object image, one specific pattern can be designated withhigh accuracy. Furthermore, it is also possible to find any defect ofthe pattern in the image to be inspected by comparing the Voronoidiagram of the reference image after the matching with the Voronoidiagram of the image to be inspected and by checking the edges andvertices which do not match each other.

(9) Ninth Embodiment

Next, a ninth embodiment of the present invention will be described withreference to FIGS. 37 and FIGS. 38A to 38C. According to the presentembodiment, there is also provided a method of preferably detecting theedge of the pattern which has a complicated contour shape.

FIG. 37 is a flowchart showing the schematic procedure of the edgesearching method in the present embodiment, and FIGS. 38A to 38C aremore specific explanatory views of the edge searching method shown inFIG. 37.

First, the image of the pattern to be inspected is acquired (FIG. 37,step S101). For explanation of the present embodiment, the pattern PT44shown in FIG. 46 is used again.

A partial enlarged view of the image of the pattern to be inspected PT44is schematically shown in FIG. 38A. Here, it is assumed that thecoordinates of vertices ST2 and ST4 of the edge SL2 of the polygonindicating the schematic edge position of the pattern PT44 is alreadygiven by the method described, for example, in the above-describedembodiment.

Next, the position coordinates of a region to be inspected SR includinga pattern PT44 a which is a part of the pattern PT44 is represented on acomplex plane in which the x-axis thereof is a real axis and the y-axisthereof is an imaginary axis (FIG. 37, step S102).

Subsequently, on the complex plane, a start point is set, for example,at the position of a point GP2 shown in FIG. 38A (FIG. 37, steps S103and S104). This start point GP2 is a simulated-source point inhydrodynamics.

Next, a point SN2 at the position of the mirror image of the sourcepoint GP2 with respect to the edge SL2 is calculated, and the point isset on the complex plane as shown in FIG. 38B (FIG. 37, step S105). Thecalculated point SN2 is a simulated-sink point in the hydrodynamics.

Next, assuming that the point GP2 is the source point and the point SN2is the sink point, an ideal fluid field is defined on the complex plane(FIG. 37, step S106). For this field of stream, a solution isanalytically given, and a function form is described in detail in page278 of “Conformal Maps” authored by Akira Watanabe (published by AsakuraShoten, 1984). A complex potential W1 representing the stream field inthis case is a complex function in the form of the following equation:W 1=log{(e ^(z)−1)/(e ^(z)+1)}  Equation (3)

Next, a contour line with respect to the real part of the equation (3),that is, a streamline is calculated (FIG. 37, step S107). A calculationresult is, for example, a curve group FL shown in FIG. 38C.

Thereafter, by executing the edge searching, for example, based on thethreshold value method in the direction along each curve of the curvegroup FL, the positions of the pattern edge are extracted (FIG. 37, stepS108).

In the present embodiment, for the edge searching, the threshold valuemethod along the searching direction is used, but the present inventionis not limited to this method. For example, a difference filter, peaksearching method, and the like may also be used.

Moreover, in the present embodiment, the extracting searching directionis determined based on the stream field of a two-dimensional fluid, butthe edge searching direction may also be determined based on atwo-dimensional electric field in which positive/negative point chargesare arranged, instead of concepts of the source and sink points.

Furthermore, the image to be inspected acquired by scanning type probemicroscopes such as the optical microscope can also appropriately beused with respect to the inspection image.

(10) Tenth Embodiment

Next, a tenth embodiment of the present invention will be described withreference to FIGS. 39 and 40A, 40B. FIG. 39 is a flowchart showing theschematic procedure of the edge searching method in the presentembodiment, and FIGS. 40A and 40B are diagrams more specifically showingthe edge searching method shown in FIG. 39. As shown in FIG. 40A, alsoin the present embodiment, the pattern PT44 shown in FIG. 46 is assumedas the pattern to be inspected. It is also assumed that the coordinatesof the vertices ST2 and ST4 of the edge SL2 of the polygon representingthe schematic edge position of the pattern PT44 are already given.

In the same manner as the ninth embodiment, first, after acquiring theimage of the pattern to be inspected (FIG. 39, step S111), the positioncoordinate of the region to be inspected SR including the pattern PT44 awhich is a part of the pattern PT44 is transformed into those on thecomplex plane (FIG. 39, step S112).

Next, one searching start point PC2 is selected in the region to beinspected SR (FIG. 39, step S113). In the present embodiment, a positivepoint charge is simulated by this start point PC2, a charge distributionhaving a linear density on a line segment of the start point PC2 isdisposed in an simulated manner, and an electrostatic potential at thistime is calculated (FIG. 39, step S114).

The electrostatic potential at this time is superposition of anelectrostatic potential W2 supplied by the point charge upon anelectrostatic potential W3 with respect to a linear negative chargedistribution. A line of electric force obtained as a result is defined(FIG. 39, step S115). Examples of these lines of electric force areshown in a curve group EL of FIG. 40B.

Then, the edge searching is performed, for example, based on thethreshold value method in the direction along each curve of the curvegroup EL to extract the position of the pattern edge (FIG. 39, stepS116).

Also in the present embodiment, in addition to the threshold valuemethod along the searching direction, the difference filter, peaksearching method, and the like can be used in searching the edge.

Moreover, in the present embodiment, the edge searching direction hasbeen determined based on the two-dimensional electric field in which thepositive/negative charges are disposed. However, the direction may alsobe determined based on the stream field of the two-dimensional fluid inwhich the source/sink is disposed, for example, instead of the pointcharge.

(11) Eleventh Embodiment

Next, an eleventh embodiment of the present invention will be describedwith reference to FIG. 41. According to the present embodiment, there isprovided a scanning method of a probe using the edge searching method inthe ninth and tenth embodiments. The method will be describedhereinafter using an electron beam as the probe. For the specificconstitution of a probe inspection apparatus, refer to a twelfthembodiment described later (FIG. 42).

FIG. 41 is a flowchart showing the schematic procedure of the probescanning method and edge searching method in the present embodiment. Asshown in the drawing, first, a control system of CD-SEM (see FIG. 42) isallowed to read the data of the vertex coordinate of the polygonindicating the schematic edge position of pattern to be inspected andthe data of the coordinate of the start point of the edge searching(step S121).

Next, the position coordinate of the region to be inspected includingthe pattern to be inspected is transformed into that on the complexplane in which the x-axis thereof is a real axis and the y-axis thereofis an imaginary axis (step S122).

Subsequently, the source point and sink point are set on the complexplane in the same manner as in the ninth embodiment to define the idealfluid field (steps S123 to S125).

Next, the streamline of the ideal fluid field is calculated, and thecoordinate positions are stored in the storage device (see FIG. 42)connected to the control system (step S126). The calculation result ofthe streamline is the same as that of the curve group FL of FIG. 38C.

Subsequently, the scanning signal of the probe is generated based on thestreamline coordinate stored in the storage device, and the probe isscanned to acquire the secondary electron signal in synchronization withthe scanning signal (step S127).

Furthermore, the edge position is defined from the profile of theacquired secondary electron signals, for example, by the threshold valuemethod, and the position information of the pattern edge is extracted(step S128).

In the present embodiment, the probe microscope is described, but thepresent invention is never limited to this apparatus. The presentinvention can be applied to all inspection apparatuses for scanning theprobe to acquire the image, such as an STM, an AFM, and a laser scanningmicroscope.

(12) Twelfth Embodiment

Next, a twelfth embodiment of the present invention will be describedwith reference to FIG. 42. According to the present embodiment, there isprovided a pattern inspection apparatus to implement the first througheleventh embodiments.

FIG. 42 is a block diagram showing the schematic constitution of thepattern inspection apparatus according to the present embodimenttogether with an apparatus connected to the inspection apparatus. Apattern inspection apparatus 1 shown in the drawing comprises anelectronic optical system controller 22, a computer 20, a memory 24, adisplay 26, and an input device 28.

An apparatus 10 also shown in FIG. 42 constitutes a probe inspectionapparatus in the present embodiment, and includes a stage 14 on which asubstrate W is mounted, an electronic optical system 12, a secondaryelectron detector 16, and a signal processor 18. The electronic opticalsystem 12 generates an electron beam EB to irradiate the substrate W onwhich a certain fine pattern is formed as the inspection object with theelectron beam EB. The secondary electron detector 16 detects secondaryelectrons/reflected electrons/backward scattered electrons generatedfrom the surface of the substrate W by irradiation with the electronbeam EB. The signal processor 18 converts an analog signal constitutedof the secondary/reflected/backward scattered electrons detected by thesecondary electron detector 16 into a digital signal, amplifies thesignal, and supplies the signal as the image data of the pattern to beinspected to the computer 20.

In the memory 24, program is stored in the form of a recipe file toexecute various operation processes for the above-described embodiments.These operation processes include: difference processing to extracthorizontal and vertical components of the pattern edge; processing toperform the matching of the lattice animal; geometric calculation tocalculate the Voronoi diagram; processing to compare the Voronoidiagrams with each other; processing to judge whether or not the pointincluding the arbitrary coordinate exists on the edge or vertex of theVoronoi diagram; processing to calculate the position of the patternedge from the gray scale value of the image; processing to calculate thecomplex or electrostatic potential based on the coordinate data of thepolygon indicating the schematic position of the pattern edge; andprocessing to calculate the coordinate data of the edge searchingdirection from the calculated complex or electrostatic potential.

The memory 24 also stores various data such as the image data of theinspection object pattern supplied from the signal processor 18 via thecomputer 20, the animal table of the information of the lattice animalstored in the form of the table, and the coordinate data of the polygonindicating the schematic position of the pattern edge.

The computer 20 in the present embodiment controls the whole apparatusand extracts the recipe file, the image data of the pattern, and thedata of the lattice animal from the memory 24 to execute theabove-described image processing, the extraction of the pattern contour,and the searching of the pattern edge. The computer 20 in the presentembodiment is connected to the electronic optical system 12 of theapparatus 10 via the electronic optical system controller 22 to supplythe control signal to the electronic optical system controller 22 and toscan the electron beam EB on the upper surface of the substrate W. Whenthe scanning method of the probe in the eleventh embodiment is executed,the control signal includes a scanning signal generated based on thecoordinate data of the edge searching direction calculated from thecomplex or electrostatic potential.

The display 26 is connected to the computer 20 to display the image tobe inspected and reference image and further to appropriately displaythese processing situations.

The input 28 includes a keyboard 28 a and mouse 28 b, and is connectedto the computer 20 to supply various input signals by an operator'soperation.

(13) Thirteenth Embodiment

When a semiconductor device is manufactured using at least one of theimage processing method, the extracting method of a pattern contour, andthe scanning method of a probe in the above-described first to eleventhembodiments, the fine pattern can more exactly and quickly be evaluated.As a result, it is possible to manufacture the semiconductor device witha higher yield and for a short turn around time (TAT).

(14) Fourteenth Embodiment

A series of procedures in the extracting method of a pattern contour,the image processing method, the searching method of a pattern edge, andthe scanning method of a probe described in the first to eleventhembodiments may also be incorporated in the program, and read andexecuted by a computer which can process the image data. Accordingly,the series of procedures in the extracting method of a pattern contour,the image processing method, the searching method of a pattern edge, andthe scanning method of a probe according to the present invention can berealized using a general-purpose computer which can process the image.The series of procedures of the extracting method of a pattern contour,the image processing method, the searching method of a pattern edge, andthe scanning method of a probe according to the present invention mayalso be stored as the program to be executed by a computer in recordingmedia such as a flexible disk and a CD-ROM, and read and executed by thecomputer. The recording media are not limited to portable media such asa magnetic disk and optical disk, and fixed type recording media such asa hard disk drive and memory may also be used. The program incorporatingthe series of procedures of the extracting method of a pattern contour,the image processing method, the searching method of a pattern edge, andthe scanning method of a probe may also be distributed via communication(including radio communication) lines such as the Internet. Furthermore,the program incorporating the series of procedures of the extractingmethod of a pattern contour, the image processing method, the searchingmethod of a pattern edge, and the scanning method of a probe may also beencrypted, modulated, or compressed, and distributed via wirecommunication lines such as the internet or radio communication lines.

The embodiments of the present invention have been described above, butthe present invention is not limited to the embodiments, and canappropriately be modified or altered without departing from the scopeand spirit thereof.

1-10. (canceled)
 11. An image processing method comprising: acquiring animage of a pattern to be inspected; extracting a part of a pointsequence which belongs to a contour of the pattern; preparing a Voronoidiagram with respect to the extracted partial point sequence; searchinga point which belongs to an edge of the pattern along an edge of theprepared Voronoi diagram to incorporate the searched point into thepartial point sequence; and removing the edge of the Voronoi diagramintersecting with the contour of the pattern to define a sub-region inthe image.
 12. The image processing method according to claim 11,further comprising: recursively repeating said preparing the Voronoidiagram, said incorporating the searched point into the partial pointsequence, and defining the sub-region in the image, with respect to atleast a part of the image.
 13. The image processing method according toclaim 11, wherein said extracting a part of the point sequence belongingto the contour of the pattern includes: searching the edge of thepattern along an outer periphery of a whole region of the image or apre-defined boundary of a region to be inspected in the image.
 14. Theimage processing method according to claim 11, wherein said extracting apart of the point sequence belonging to the contour of the patternincludes: searching the edge of the pattern along a continuous linewhich divides a whole region of the image or a pre-defined region to beinspected in the image into two regions.
 15. The image processing methodaccording to claim 11, wherein said extracting a part of the pointsequence belonging to the contour of the pattern includes: preparing alattice having a lattice constant equal to a minimum linear width of thepattern included in a whole region of the image or a pre-defined regionto be inspected in the image; and searching the contour of the patternalong the prepared lattice.
 16. The image processing method according toclaim 11, further comprising: comparing a geometric shape orconnectivity of the Voronoi diagram or a part of the Voronoi diagramwith that of another Voronoi diagram or a part of another Voronoidiagram to define a partial region of the image.
 17. A program whichallows a computer to implement an image processing method comprising:acquiring an image of a pattern to be inspected; extracting a part of apoint sequence which belongs to a contour of the pattern; preparing aVoronoi diagram with respect to the extracted partial point sequence;searching a point which belongs to an edge of the pattern along an edgeof the prepared Voronoi diagram to incorporate the searched point intothe partial point sequence; and removing the edge of the Voronoi diagramintersecting with the contour of the pattern to define a sub-region inthe image.
 18. A manufacturing method of a semiconductor device,comprising an image processing method including: acquiring an image of apattern to be inspected; extracting a part of a point sequence whichbelongs to a contour of the pattern; preparing a Voronoi diagram withrespect to the extracted partial point sequence; searching a point whichbelongs to an edge of the pattern along an edge of the prepared Voronoidiagram to incorporate the searched point into the partial pointsequence; and removing the edge of the Voronoi diagram intersecting withthe contour of the pattern to define a sub-region in the image. 19-35.(canceled)
 36. A pattern inspection apparatus comprising: a pointsequence extractor which receives data of an image of a pattern to beinspected and which extracts a part of a point sequence belonging to acontour of the pattern; an image processor which prepares a Voronoidiagram with respect to the extracted partial point sequence and whichsearches a point belonging to the edge of the pattern along an edge ofthe prepared Voronoi diagram to incorporate the searched point into thepartial point sequence and which removes an edge of the Voronoi diagramintersecting with the contour of the pattern to define a sub-region inthe image; and an edge searcher which searches the edge of the patternfor each sub-region. 37-38. (canceled)